<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>race方法封装</title>
  <script src="../Promise_js/18_Promise.js"></script>
</head>
<body>
  
  <!-- <script>
    let p1 = new Promise( (resolve, reject) => {
      // resolve('OK')
      // reject('error')
      // throw 'err'
      // setTimeout( () => {
      //   resolve('OK')
      //   reject('error')
      // })
    })

    p1.then(value => {
      console.log(value);
    },reason => {
      console.warn(reason);
    })
  </script> -->

  <!-- <script>
    console.log(Promise.resolve('ok'));
  </script> -->

  <!-- <script>
    console.log(Promise.reject('err'));
  </script> -->
</body>
</html>